package com.lee.boot.head.first.demo.config;

import javax.servlet.ServletContextEvent;
import javax.servlet.ServletContextListener;
import javax.servlet.annotation.WebListener;

/**
 * @Auther: LiHeng
 * @Date: 2018/9/20 09:30
 * @Description:
 */
@WebListener(value = "sakkkListenner")
public class SakkkListenner implements ServletContextListener {
    /**
     * 上下文初始化的时候执行
     */
    @Override
    public void contextInitialized(ServletContextEvent servletContextEvent) {
        System.out.println("大哥走一波！！！！");
    }

    /**
     * 上下文关闭删除的时候执行
     *
     * @param servletContextEvent
     */
    @Override
    public void contextDestroyed(ServletContextEvent servletContextEvent) {
        System.out.println("大哥慢走！");
    }
}
